package cn.yunyichina.provider.hisiface.invoke.openservice;

import java.util.Map;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import cn.yunyichina.provider.framework.dubbo.service.SbService;
import cn.yunyichina.provider.hisiface.invoke.IOutsideInvoke;
import cn.yunyichina.provider.iface.entity.common.Response;
import cn.yunyichina.utils.convert.JsonUtils;

import com.alibaba.fastjson.JSON;

/**
 * 商保-手术记录已出通知
 *
 * @author zhou
 * @date 2017年7月14日
 */
public class ReportSBSurgeryService implements IOutsideInvoke {

	private static final Logger logger = LoggerFactory.getLogger(ReportSBSurgeryService.class);

	@Override
	public String execute(Map<String, String> params) {
		String paramsStr = JSON.toJSONString(params);
		logger.info("openService:reportSBSurgery 接收到前置机的入参: {}", paramsStr);

		String method = "yyt.sb.notify.surgery.report";
		Response response = SbService.callHumpFromInternal(method, paramsStr);
		String result = JsonUtils.toJsonString(response);
		logger.info("openService:reportSBSurgery 接收到[{}]的返回: {}",method, result);
		logger.info("openService:reportSBSurgery 返回给前置机: {}", result);
		
		return result;
	}

}
